<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<div class="header">
	<h2>
		流程表单定义信息<span><font color="red">（* 为必填项）</font> </span>
	</h2>
</div>
<form:form commandName="model" cssClass="validate" id="dbEntityForm"
	action="individuation/dbEntity/save">
	<form:hidden path="id" />
	<table class=" form-table">
		<tbody>
			<tr>
				<td class="td1">名称：</td>
				<td class="td2"><form:input path="name" />
				</td>
			</tr>
			<tr>
				<td class="td1">表名：</td>
				<td class="td2"><form:input path="tableName" />
				</td>
			</tr>
			<tr>
				<td class="td1">排序：</td>
				<td class="td2"><form:input path="orderNum" cssClass="number" />
				</td>
			</tr>

		</tbody>
	</table>
</form:form>

<div class="box no-border">
	<div class="header">
		<h2>实体字段</h2>
	</div>
	<isperp:grid url="individuation/dbEntityField/list?entityId="
		urlExtScript="function(){return $('#id').val();}"
		gridId="entityFieldGrid" gridTitle="实体字段" cusFormatterActions="true"
		showSearchbar="false" showPager="false"
		beforeCreateAction="'entityId='+$('#id').val()"
		cusEditUrl="individuation/dbEntityField/edit" cusDeleteUrl="individuation/dbEntityField/delete"
		ondbClickRowEvent="entityFieldGrid.edit(rowid);">
		<jsp:attribute name="toolbar">
				<isperp:toolbar id="entityFieldToolbar">
					<isperp:button id="entityFieldCreate" text="新增" icon="icon-plus"
					onclick="entityFieldGrid.create();"></isperp:button>	
					<isperp:button id="entityFieldGenerate" text="生成实体列"
					icon="icon-plus" onclick="entityFieldGenerate_Onclick();"></isperp:button>
				</isperp:toolbar>
			</jsp:attribute>
		<jsp:body>
				<isperp:column name="id" title="id" hidden="true"></isperp:column>
				<isperp:column name="name" title="名称" width="100">
				</isperp:column>
				<isperp:column name="columnName" title="数据库列名" width="120">
				</isperp:column>
			</jsp:body>
	</isperp:grid>
</div>

<isperp:buttonList>
	<button class="submit nui-mainbtn" onclick="isperp.submitForm();">保存</button>
</isperp:buttonList>


